import { Service } from "cl-admin";
import BaseService from "@/service/base";

@Service("shopBrand")
class ShopBrand extends BaseService {
	page({ size, ...args }) {
		let params = {
			...args,
			size: size
		};
		return this.$get("/list", { params })
			// .then(res => {
			// 	return {
			// 		list: res?.lists?.data ?? [],
			// 		pagination: {
			// 			...params,
			// 			size,
			// 			total: res?.lists?.total ?? 0
			// 		}
			// 	};
			// })
			// .catch(() => { });
	}
	add(params) {
		return this.$post("/add", params, {
			silence: true
		});
	}
	edit(params) {
		return this.$post("/edit", params, {
			silence: true
		});
	}
	del(params) {
		return this.$post(
			"/del",
			params
			// {
			// 	silence: true
			// }
		);
	}
}

export default ShopBrand;
